package ${model};
<#assign hasDateField = false>
<#assign hasBigDecimal = false>
<#list columnList as data>
    <#if data.varType=='Date' && !hasDateField>
        <#assign hasDateField = true>
    </#if>
    <#if data.varType=='BigDecimal' && !hasBigDecimal>
        <#assign hasBigDecimal = true>
    </#if>
</#list>

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
<#if hasBigDecimal>
import java.math.BigDecimal;
</#if>
<#if hasDateField>
import java.util.Date;
</#if>

/**
 * ${tableInfo.tableComment}实体类
 *
 * @author ${author}
 * @date ${date}
 **/
@Data
@Table(name = "${tableInfo.tableName}")
public class ${tableInfo.className} {
<#list columnList as data>

    /**
     * ${data.columnComment}
     */
    <#if data.columnName == "ID">
    @Id
    @Column(name = "ID")
    <#else>
    @Column(name = "${data.columnName}")
    </#if>
    private ${data.varType} ${data.varName};
</#list>
}
